Not efficient, but it functions.